﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using System.Data;
using System.Data.SqlClient;

namespace DAO
{
    public class ChiTietThuoc_DAO
    {
        public static Boolean ThemChiTietThuoc(ChiTietToaThuoc_DTO ctThuoc_dto)
        {
            List<SqlParameter> ParaArr = new List<SqlParameter>();
            string procname = "sp_ThemChiTietThuoc";
            ParaArr.Add(new SqlParameter("@MaThuoc",ctThuoc_dto.MaThuoc));
            ParaArr.Add(new SqlParameter("@MaHDThuoc",ctThuoc_dto.MaHDThuoc));
            ParaArr.Add(new SqlParameter("@SoLuong",ctThuoc_dto.SoLuong));
            ParaArr.Add(new SqlParameter("@DonGia",ctThuoc_dto.DonGia));
            ParaArr.Add(new SqlParameter("@ChiDan",ctThuoc_dto.ChiDan));
            return DataProvider.NonqueryProc(procname, ParaArr);
        }
    }
}
